package net.zjitc.api;

/**
 * @Author admin
 * @Date 2019/3/26 16:47
 */
public class Test {
    public static void main(String[] args) {
        Student student=new Student("张三");
        /*Student类中没有定义toString方法
        * Object类中有toString方法
        *Student继承Object
         * Object是所有类的根类 */
        System.out.println(student.toString());
        /*调用了该对象的toString方法*/
        System.out.println(student);

        System.out.println("-----------------------");
        Student student1=new Student("张三");
        System.out.println(student.equals(student1));
    }
}
